\(\int \frac {1}{1+\sin ^8(x)} \, dx\) [257]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [C] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 8, antiderivative size = 218 \[ \int \frac {1}{1+\sin ^8(x)} \, dx=\frac {1}{8} \left (\sqrt {1+\sqrt {4-2 \sqrt {2}}}+\sqrt {2+2 \sqrt [4]{2}+2 \sqrt {1+\sqrt {2}}+2 \sqrt {2+\sqrt {2}}}+\sqrt {1+\sqrt {4+2 \sqrt {2}}}\right ) (x-\arctan (\tan (x)))+\frac {\arctan \left (\sqrt {1-\sqrt [4]{-1}} \tan (x)\right )}{4 \sqrt {1-\sqrt [4]{-1}}}+\frac {\arctan \left (\sqrt {1+\sqrt [4]{-1}} \tan (x)\right )}{4 \sqrt {1+\sqrt [4]{-1}}}+\frac {\arctan \left (\sqrt {1-(-1)^{3/4}} \tan (x)\right )}{4 \sqrt {1-(-1)^{3/4}}}+\frac {\arctan \left (\sqrt {1+(-1)^{3/4}} \tan (x)\right )}{4 \sqrt {1+(-1)^{3/4}}} \]

[Out]

1/4*arctan((1-(-1)^(1/4))^(1/2)*tan(x))/(1-(-1)^(1/4))^(1/2)+1/4*arctan((1+(-1)^(1/4))^(1/2)*tan(x))/(1+(-1)^(
1/4))^(1/2)+1/4*arctan((1-(-1)^(3/4))^(1/2)*tan(x))/(1-(-1)^(3/4))^(1/2)+1/4*arctan((1+(-1)^(3/4))^(1/2)*tan(x
))/(1+(-1)^(3/4))^(1/2)+1/8*(x-arctan(tan(x)))*((1+(4-2*2^(1/2))^(1/2))^(1/2)+(2+2*2^(1/4)+2*(1+2^(1/2))^(1/2)
+2*(2+2^(1/2))^(1/2))^(1/2)+(1+(4+2*2^(1/2))^(1/2))^(1/2))

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.59, number of steps used = 9, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3290, 3260, 209} \[ \int \frac {1}{1+\sin ^8(x)} \, dx=\frac {\arctan \left (\sqrt {1-\sqrt [4]{-1}} \tan (x)\right )}{4 \sqrt {1-\sqrt [4]{-1}}}+\frac {\arctan \left (\sqrt {1+\sqrt [4]{-1}} \tan (x)\right )}{4 \sqrt {1+\sqrt [4]{-1}}}+\frac {\arctan \left (\sqrt {1-(-1)^{3/4}} \tan (x)\right )}{4 \sqrt {1-(-1)^{3/4}}}+\frac {\arctan \left (\sqrt {1+(-1)^{3/4}} \tan (x)\right )}{4 \sqrt {1+(-1)^{3/4}}} \]

[In]

Int[(1 + Sin[x]^8)^(-1),x]

[Out]

ArcTan[Sqrt[1 - (-1)^(1/4)]*Tan[x]]/(4*Sqrt[1 - (-1)^(1/4)]) + ArcTan[Sqrt[1 + (-1)^(1/4)]*Tan[x]]/(4*Sqrt[1 +
 (-1)^(1/4)]) + ArcTan[Sqrt[1 - (-1)^(3/4)]*Tan[x]]/(4*Sqrt[1 - (-1)^(3/4)]) + ArcTan[Sqrt[1 + (-1)^(3/4)]*Tan
[x]]/(4*Sqrt[1 + (-1)^(3/4)])

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 3260

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist
[ff/f, Subst[Int[1/(a + (a + b)*ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x]

Rule 3290

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(-1), x_Symbol] :> Module[{k}, Dist[2/(a*n), Sum[Int[1/(1 - Si
n[e + f*x]^2/((-1)^(4*(k/n))*Rt[-a/b, n/2])), x], {k, 1, n/2}], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[n/2]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{4} \int \frac {1}{1-\sqrt [4]{-1} \sin ^2(x)} \, dx+\frac {1}{4} \int \frac {1}{1+\sqrt [4]{-1} \sin ^2(x)} \, dx+\frac {1}{4} \int \frac {1}{1-(-1)^{3/4} \sin ^2(x)} \, dx+\frac {1}{4} \int \frac {1}{1+(-1)^{3/4} \sin ^2(x)} \, dx \\ & = \frac {1}{4} \text {Subst}\left (\int \frac {1}{1+\left (1-\sqrt [4]{-1}\right ) x^2} \, dx,x,\tan (x)\right )+\frac {1}{4} \text {Subst}\left (\int \frac {1}{1+\left (1+\sqrt [4]{-1}\right ) x^2} \, dx,x,\tan (x)\right )+\frac {1}{4} \text {Subst}\left (\int \frac {1}{1+\left (1-(-1)^{3/4}\right ) x^2} \, dx,x,\tan (x)\right )+\frac {1}{4} \text {Subst}\left (\int \frac {1}{1+\left (1+(-1)^{3/4}\right ) x^2} \, dx,x,\tan (x)\right ) \\ & = \frac {\arctan \left (\sqrt {1-\sqrt [4]{-1}} \tan (x)\right )}{4 \sqrt {1-\sqrt [4]{-1}}}+\frac {\arctan \left (\sqrt {1+\sqrt [4]{-1}} \tan (x)\right )}{4 \sqrt {1+\sqrt [4]{-1}}}+\frac {\arctan \left (\sqrt {1-(-1)^{3/4}} \tan (x)\right )}{4 \sqrt {1-(-1)^{3/4}}}+\frac {\arctan \left (\sqrt {1+(-1)^{3/4}} \tan (x)\right )}{4 \sqrt {1+(-1)^{3/4}}} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.

Time = 5.05 (sec) , antiderivative size = 141, normalized size of antiderivative = 0.65 \[ \int \frac {1}{1+\sin ^8(x)} \, dx=8 \text {RootSum}\left [1-8 \text {$\#$1}+28 \text {$\#$1}^2-56 \text {$\#$1}^3+326 \text {$\#$1}^4-56 \text {$\#$1}^5+28 \text {$\#$1}^6-8 \text {$\#$1}^7+\text {$\#$1}^8\&,\frac {2 \arctan \left (\frac {\sin (2 x)}{\cos (2 x)-\text {$\#$1}}\right ) \text {$\#$1}^3-i \log \left (1-2 \cos (2 x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^3}{-1+7 \text {$\#$1}-21 \text {$\#$1}^2+163 \text {$\#$1}^3-35 \text {$\#$1}^4+21 \text {$\#$1}^5-7 \text {$\#$1}^6+\text {$\#$1}^7}\&\right ] \]

[In]

Integrate[(1 + Sin[x]^8)^(-1),x]

[Out]

8*RootSum[1 - 8*#1 + 28*#1^2 - 56*#1^3 + 326*#1^4 - 56*#1^5 + 28*#1^6 - 8*#1^7 + #1^8 & , (2*ArcTan[Sin[2*x]/(
Cos[2*x] - #1)]*#1^3 - I*Log[1 - 2*Cos[2*x]*#1 + #1^2]*#1^3)/(-1 + 7*#1 - 21*#1^2 + 163*#1^3 - 35*#1^4 + 21*#1
^5 - 7*#1^6 + #1^7) & ]

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 4.45 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.33

method result size
default \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (2 \textit {\_Z}^{8}+4 \textit {\_Z}^{6}+6 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )}{\sum }\frac {\left (\textit {\_R}^{6}+3 \textit {\_R}^{4}+3 \textit {\_R}^{2}+1\right ) \ln \left (\tan \left (x \right )-\textit {\_R} \right )}{2 \textit {\_R}^{7}+3 \textit {\_R}^{5}+3 \textit {\_R}^{3}+\textit {\_R}}\right )}{8}\) \(71\)
risch \(\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (8192 \textit {\_Z}^{4}+\left (128+128 i\right ) \textit {\_Z}^{2}+1+i\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 i x}+\left (1024-1024 i\right ) \textit {\_R}^{3}+\left (128+128 i\right ) \textit {\_R}^{2}+\left (16+16 i\right ) \textit {\_R} -1+2 i\right )\right )+\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (8192 \textit {\_Z}^{4}+\left (128-128 i\right ) \textit {\_Z}^{2}+1-i\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 i x}+\left (-1024-1024 i\right ) \textit {\_R}^{3}+\left (128-128 i\right ) \textit {\_R}^{2}+\left (-16+16 i\right ) \textit {\_R} -1-2 i\right )\right )\) \(104\)

[In]

int(1/(1+sin(x)^8),x,method=_RETURNVERBOSE)

[Out]

1/8*sum((_R^6+3*_R^4+3*_R^2+1)/(2*_R^7+3*_R^5+3*_R^3+_R)*ln(tan(x)-_R),_R=RootOf(2*_Z^8+4*_Z^6+6*_Z^4+4*_Z^2+1
))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 893 vs. \(2 (152) = 304\).

Time = 0.43 (sec) , antiderivative size = 893, normalized size of antiderivative = 4.10 \[ \int \frac {1}{1+\sin ^8(x)} \, dx=\text {Too large to display} \]

[In]

integrate(1/(1+sin(x)^8),x, algorithm="fricas")

[Out]

-1/32*sqrt(2)*sqrt(-sqrt(2*sqrt(2) - 3) - 1)*log(2*(sqrt(2) + 1)*cos(x)^2 + (2*(sqrt(2) + 2)*cos(x)^2 - sqrt(2
) - 2)*sqrt(2*sqrt(2) - 3) + 2*(sqrt(2*sqrt(2) - 3)*(sqrt(2) + 1)*cos(x)*sin(x) + (sqrt(2) + 1)*cos(x)*sin(x))
*sqrt(-sqrt(2*sqrt(2) - 3) - 1) - sqrt(2) - 2) + 1/32*sqrt(2)*sqrt(-sqrt(2*sqrt(2) - 3) - 1)*log(2*(sqrt(2) +
1)*cos(x)^2 + (2*(sqrt(2) + 2)*cos(x)^2 - sqrt(2) - 2)*sqrt(2*sqrt(2) - 3) - 2*(sqrt(2*sqrt(2) - 3)*(sqrt(2) +
 1)*cos(x)*sin(x) + (sqrt(2) + 1)*cos(x)*sin(x))*sqrt(-sqrt(2*sqrt(2) - 3) - 1) - sqrt(2) - 2) - 1/32*sqrt(2)*
sqrt(sqrt(2*sqrt(2) - 3) - 1)*log(-2*(sqrt(2) + 1)*cos(x)^2 + (2*(sqrt(2) + 2)*cos(x)^2 - sqrt(2) - 2)*sqrt(2*
sqrt(2) - 3) + 2*(sqrt(2*sqrt(2) - 3)*(sqrt(2) + 1)*cos(x)*sin(x) - (sqrt(2) + 1)*cos(x)*sin(x))*sqrt(sqrt(2*s
qrt(2) - 3) - 1) + sqrt(2) + 2) + 1/32*sqrt(2)*sqrt(sqrt(2*sqrt(2) - 3) - 1)*log(-2*(sqrt(2) + 1)*cos(x)^2 + (
2*(sqrt(2) + 2)*cos(x)^2 - sqrt(2) - 2)*sqrt(2*sqrt(2) - 3) - 2*(sqrt(2*sqrt(2) - 3)*(sqrt(2) + 1)*cos(x)*sin(
x) - (sqrt(2) + 1)*cos(x)*sin(x))*sqrt(sqrt(2*sqrt(2) - 3) - 1) + sqrt(2) + 2) + 1/32*sqrt(2)*sqrt(-sqrt(-2*sq
rt(2) - 3) - 1)*log(2*(sqrt(2) - 1)*cos(x)^2 + (2*(sqrt(2) - 2)*cos(x)^2 - sqrt(2) + 2)*sqrt(-2*sqrt(2) - 3) +
 2*((sqrt(2) - 1)*sqrt(-2*sqrt(2) - 3)*cos(x)*sin(x) + (sqrt(2) - 1)*cos(x)*sin(x))*sqrt(-sqrt(-2*sqrt(2) - 3)
 - 1) - sqrt(2) + 2) - 1/32*sqrt(2)*sqrt(-sqrt(-2*sqrt(2) - 3) - 1)*log(2*(sqrt(2) - 1)*cos(x)^2 + (2*(sqrt(2)
 - 2)*cos(x)^2 - sqrt(2) + 2)*sqrt(-2*sqrt(2) - 3) - 2*((sqrt(2) - 1)*sqrt(-2*sqrt(2) - 3)*cos(x)*sin(x) + (sq
rt(2) - 1)*cos(x)*sin(x))*sqrt(-sqrt(-2*sqrt(2) - 3) - 1) - sqrt(2) + 2) + 1/32*sqrt(2)*sqrt(sqrt(-2*sqrt(2) -
 3) - 1)*log(-2*(sqrt(2) - 1)*cos(x)^2 + (2*(sqrt(2) - 2)*cos(x)^2 - sqrt(2) + 2)*sqrt(-2*sqrt(2) - 3) + 2*((s
qrt(2) - 1)*sqrt(-2*sqrt(2) - 3)*cos(x)*sin(x) - (sqrt(2) - 1)*cos(x)*sin(x))*sqrt(sqrt(-2*sqrt(2) - 3) - 1) +
 sqrt(2) - 2) - 1/32*sqrt(2)*sqrt(sqrt(-2*sqrt(2) - 3) - 1)*log(-2*(sqrt(2) - 1)*cos(x)^2 + (2*(sqrt(2) - 2)*c
os(x)^2 - sqrt(2) + 2)*sqrt(-2*sqrt(2) - 3) - 2*((sqrt(2) - 1)*sqrt(-2*sqrt(2) - 3)*cos(x)*sin(x) - (sqrt(2) -
 1)*cos(x)*sin(x))*sqrt(sqrt(-2*sqrt(2) - 3) - 1) + sqrt(2) - 2)

Sympy [F]

\[ \int \frac {1}{1+\sin ^8(x)} \, dx=\int \frac {1}{\sin ^{8}{\left (x \right )} + 1}\, dx \]

[In]

integrate(1/(1+sin(x)**8),x)

[Out]

Integral(1/(sin(x)**8 + 1), x)

Maxima [F]

\[ \int \frac {1}{1+\sin ^8(x)} \, dx=\int { \frac {1}{\sin \left (x\right )^{8} + 1} \,d x } \]

[In]

integrate(1/(1+sin(x)^8),x, algorithm="maxima")

[Out]

integrate(1/(sin(x)^8 + 1), x)

Giac [F]

\[ \int \frac {1}{1+\sin ^8(x)} \, dx=\int { \frac {1}{\sin \left (x\right )^{8} + 1} \,d x } \]

[In]

integrate(1/(1+sin(x)^8),x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 14.96 (sec) , antiderivative size = 945, normalized size of antiderivative = 4.33 \[ \int \frac {1}{1+\sin ^8(x)} \, dx=\text {Too large to display} \]

[In]

int(1/(sin(x)^8 + 1),x)

[Out]

atan((tan(x)*((- 2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*1i)/(256*((3*2^(1/2)*(- 2*2^(1/2) - 3)^(1/2))/2048 -
(- 2*2^(1/2) - 3)^(1/2)/512)) - (2^(1/2)*tan(x)*((- 2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*1i)/(256*((3*2^(1/
2)*(- 2*2^(1/2) - 3)^(1/2))/2048 - (- 2*2^(1/2) - 3)^(1/2)/512)) - (tan(x)*(- 2*2^(1/2) - 3)^(1/2)*((- 2*2^(1/
2) - 3)^(1/2)/128 - 1/128)^(1/2)*7i)/(256*((3*2^(1/2)*(- 2*2^(1/2) - 3)^(1/2))/2048 - (- 2*2^(1/2) - 3)^(1/2)/
512)) + (2^(1/2)*tan(x)*(- 2*2^(1/2) - 3)^(1/2)*((- 2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*5i)/(256*((3*2^(1/
2)*(- 2*2^(1/2) - 3)^(1/2))/2048 - (- 2*2^(1/2) - 3)^(1/2)/512)))*((- 2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*
2i - atan((tan(x)*(- (- 2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*1i)/(256*((3*2^(1/2)*(- 2*2^(1/2) - 3)^(1/2))/
2048 - (- 2*2^(1/2) - 3)^(1/2)/512)) - (2^(1/2)*tan(x)*(- (- 2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*1i)/(256*
((3*2^(1/2)*(- 2*2^(1/2) - 3)^(1/2))/2048 - (- 2*2^(1/2) - 3)^(1/2)/512)) + (tan(x)*(- 2*2^(1/2) - 3)^(1/2)*(-
 (- 2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*7i)/(256*((3*2^(1/2)*(- 2*2^(1/2) - 3)^(1/2))/2048 - (- 2*2^(1/2)
- 3)^(1/2)/512)) - (2^(1/2)*tan(x)*(- 2*2^(1/2) - 3)^(1/2)*(- (- 2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*5i)/(
256*((3*2^(1/2)*(- 2*2^(1/2) - 3)^(1/2))/2048 - (- 2*2^(1/2) - 3)^(1/2)/512)))*(- (- 2*2^(1/2) - 3)^(1/2)/128
- 1/128)^(1/2)*2i + atan((tan(x)*(- (2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*1i)/(256*((3*2^(1/2)*(2*2^(1/2) -
 3)^(1/2))/2048 + (2*2^(1/2) - 3)^(1/2)/512)) + (2^(1/2)*tan(x)*(- (2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*1i
)/(256*((3*2^(1/2)*(2*2^(1/2) - 3)^(1/2))/2048 + (2*2^(1/2) - 3)^(1/2)/512)) + (tan(x)*(2*2^(1/2) - 3)^(1/2)*(
- (2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*7i)/(256*((3*2^(1/2)*(2*2^(1/2) - 3)^(1/2))/2048 + (2*2^(1/2) - 3)^
(1/2)/512)) + (2^(1/2)*tan(x)*(2*2^(1/2) - 3)^(1/2)*(- (2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*5i)/(256*((3*2
^(1/2)*(2*2^(1/2) - 3)^(1/2))/2048 + (2*2^(1/2) - 3)^(1/2)/512)))*(- (2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*
2i - atan((tan(x)*((2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*1i)/(256*((3*2^(1/2)*(2*2^(1/2) - 3)^(1/2))/2048 +
 (2*2^(1/2) - 3)^(1/2)/512)) + (2^(1/2)*tan(x)*((2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*1i)/(256*((3*2^(1/2)*
(2*2^(1/2) - 3)^(1/2))/2048 + (2*2^(1/2) - 3)^(1/2)/512)) - (tan(x)*(2*2^(1/2) - 3)^(1/2)*((2*2^(1/2) - 3)^(1/
2)/128 - 1/128)^(1/2)*7i)/(256*((3*2^(1/2)*(2*2^(1/2) - 3)^(1/2))/2048 + (2*2^(1/2) - 3)^(1/2)/512)) - (2^(1/2
)*tan(x)*(2*2^(1/2) - 3)^(1/2)*((2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*5i)/(256*((3*2^(1/2)*(2*2^(1/2) - 3)^
(1/2))/2048 + (2*2^(1/2) - 3)^(1/2)/512)))*((2*2^(1/2) - 3)^(1/2)/128 - 1/128)^(1/2)*2i